Module-level declarations

Operations

Link copied to clipboard
@mount("ft4.admin.add_rate_limit_points") operation add_rate_limit_points(account_id: byte_array, amount: integer)

Adds rate limit points to an account, allowing it to send more transactions even if it reached the limit. If the new amount of points is greater than the maximum amount of allowed points, the account will have the maximum amount of points.

Throws if not signed by the admin.

Throws "NEGATIVE RATE LIMIT" when amount is less than 1

Throws if the account or its rl_config does not exist

Link copied to clipboard
@mount("ft4.admin.mint") operation mint(account_id: byte_array, asset_id: byte_array, amount: big_integer)

Mints assets and gives them to an account.

Throws if not signed by the admin.

Throws if the account or the asset is not found.

Throws if the asset cannot be minted. Common cases include:

  • the amount to mint is not in the accepted range (0, 2^256) (exclusive)

  • some conditions added in development through mint extensions (before_mint or after_mint) aren't met

  • the asset's issuing blockchain is not this blockchain

  • the asset's total supply, increased by the amount being minted, is higher than 2^256

Link copied to clipboard
@mount("ft4.admin.register_account") operation register_account(auth_descriptor: auth_descriptor)

Registers a new account on this chain.

Throws if not signed by the admin.

Throws if the account cannot be created. Common cases include:

  • errors with the args field:

    • some required flags are missing

    • in multi-sig auth descriptors, the required_signatures field:

      • is 0 or less

      • is greater than the number of signers

  • errors with the rules field:

    • rules is not null.to_gtv().to_bytes()

Link copied to clipboard
@mount("ft4.admin.register_asset") operation register_asset(name: text, symbol: text, decimals: integer, icon_url: text)

Registers a new asset on this chain, with this chain as issuer of the token.

Throws if not signed by the admin.

Throws if the asset cannot be registered. Common cases include:

  • the input parameters do not follow this criteria:

    • strings are longer than 1024

    • decimals is not in the accepted range 0, 78 (inclusive)

  • icon_url is not a valid URL

Link copied to clipboard
@mount("ft4.admin.register_asset_with_type") operation register_asset_with_type(name: text, symbol: text, decimals: integer, icon_url: text, type: text)

Like register_asset, but allows specifying a type for the asset as well.

Throws if not signed by the admin.

Throws if the asset cannot be registered. Common cases include:

  • the input parameters do not follow this criteria:

    • strings are longer than 1024 characters

    • type is empty

    • decimals is not in the accepted range 0, 78 (inclusive)

  • icon_url is not a valid URL